//package com.pengzy.core.gateway_security;
//
//import com.pengzy.comment.web.result.JsonResult;
//import com.pengzy.comment.web.webFluxUtils.ResponseResult;
//import org.springframework.http.HttpHeaders;
//import org.springframework.security.core.Authentication;
//import org.springframework.security.web.server.WebFilterExchange;
//import org.springframework.security.web.server.authentication.logout.ServerLogoutSuccessHandler;
//import org.springframework.stereotype.Component;
//import reactor.core.publisher.Mono;
//
///**
// * @author xiaozhi 2023/7/18
// */
//
//@Component
//public class LogoutsSuccessConfig implements ServerLogoutSuccessHandler {
//
//    @Override
//    public Mono<Void> onLogoutSuccess(WebFilterExchange exchange, Authentication authentication) {
//        String jwt = exchange.getExchange().getRequest().getHeaders().getFirst(HttpHeaders.AUTHORIZATION);
//        //log.debug("用户{}推出登录！但是jwt是无状态的，仍然可以使用",JwtTokenUtils.parseTokenToMap(jwt).get("user"));
////        Map<String, String> responseMap = new HashMap<>();
////        responseMap.put("code", "success");
////        responseMap.put("msg", "退出成功");
//        return ResponseResult.writeWith(exchange.getExchange(), JsonResult.error("退出成功"));
//    }
//}
